/**
 * Created by win7 on 2017/3/15.
 */
/**
 * Created by win7 on 2017/3/15.
 */
import Relay from "react-relay";

export default class UpdateEnterpriseStatusMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { updateEnterpriseStatus }`;
    }

    getVariables() {
        return {
            argsInput: {
                enterpriseIds: this.props.enterpriseIds,
                reason: this.props.reason,
                status:this.props.status
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on updateEnterpriseStatusPayload {
            data {
                errorCode
                value
                totalResult
                id
                token
                enterprise{
                    status
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
                fragment on updateEnterpriseStatusPayload {
            data {
                errorCode
                value
                totalResult
                id
                token
                    enterprise{
                        status
                    }
                }
                }
            `]
        }];
    }

}